#include<iostream>
using namespace std;

int cnt;

void dfs(int x, int y)
{
	if(!x%y || x/y >= 2)
		return ;
	cnt++;
	dfs(y, x%y);
}

int main()
{
	int a, b;
	while(cin>>a>>b && a && b)
	{
		cnt = 0;
		if(a < b)
			swap(a, b);
		dfs(a, b);
		if(!(cnt%2))
			cout<<"win"<<endl;
		else
			cout<<"lose"<<endl;
	}
}
